Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some mvt tests. #5149

Merged
merged 2 commits into from
Jul 17, 2018
Merged

Some mvt tests. #5149

merged 2 commits into from
Jul 17, 2018

Conversation

vershwal
Copy link
Collaborator

Hey @bhousel!!
Here are some tests for #5072. Please check.


describe('#url', function() {
it('handles pbf url', function () {
var url = 'https://api.mapbox.com/v4/mapbox.mapbox-streets-v6/9/150/194.vector.pbf?access_token='
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid linking to a mapbox streets pbf here.
Can you try to use sinon to fake a response?

Here is an example in the OpenStreetCam test:
https://github.com/openstreetmap/iD/blob/master/test/spec/services/openstreetcam.js#L54-L105

I think it would be ok to store .pbf test fixture in the test/data folder, and use fs.readFile to load the data .

@bhousel
Copy link
Member

bhousel commented Jul 17, 2018

Cool, thanks for fixing these to avoid the network access!

@bhousel bhousel merged commit 4c9ef45 into openstreetmap:master Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants